import req from '../utils/request'

// 获取行业列表
export function getIndustryTree(data) {
  return req.get('/api/human/industry/tree')
}

// 签约主体分页查询
export function getContractSubjectList(data) {
  return req.post('/api/human/contractSubject/page', data)
}

// 签约主体批量查询
export function getContractSubjectListQuery(data) {
  return req.post('/api/human/contractSubjectQuotation/query', data)
}

// 签约主体单个信息
export function getContractSubjectInfo(id) {
  return req.get(`/api/human/contractSubject/${id}`)
}

// 添加签约主体
export function addContractSubject(data) {
  return req.post('/api/human/contractSubject', data)
}

// 编辑签约主体
export function editContractSubject(data) {
  return req.put('/api/human/contractSubject', data)
}

// 删除签约主体
export function deleteContractSubject(data) {
  return req.delete('/api/human/contractSubject', { data })
}

// 签约主体认证
export function bindContractSubject(data) {
  return req.put('/api/human/contractSubject/certification', data)
}

// 添加开票信息/修改
export function addContractSubjectAccountListUpdate(data) {
  return req.put(
    '/api/human/contractSubject/contractSubjectAccountListUpdate',
    data
  )
}

// 删除开票信息
export function deleteContractSubjectAccount(params) {
  return req.delete(
    '/api/human/contractSubject/contractSubjectAccountDelById',
    { params }
  )
}

// 获取开票信息
export function getContractSubjectAccountList(data) {
  return req.get('/api/human/contractSubject/contractSubjectAccountList', data)
}

// 添加付款信息/修改
export function addContractSubjectPaymentAccountListUpdate(data) {
  return req.put(
    '/api/human/contractSubject/contractSubjectPaymentAccountListUpdate',
    data
  )
}

// 删除开票信息
export function deleteContractSubjectPaymentAccount(params) {
  return req.delete(
    '/api/human/contractSubject/contractSubjectPaymentAccountDelById',
    { params }
  )
}

// 获取付款信息
export function getPaymentAccountList(data) {
  return req.get(
    '/api/human/contractSubject/contractSubjectPaymentAccountListByContractSubjectId',
    data
  )
}

// 获取报价单分页查询
export function getContractSubjectQuotation(data) {
  return req.post('/api/human/contractSubjectQuotation/page', data)
}
// 获取报价单分页查询
export function deleteContractSubjectQuotation(data) {
  return req.delete('/api/human/contractSubjectQuotation', { data })
}

// 获取报价单详细信息
export function addContractSubjectQuotationInfo(id) {
  return req.get(`/api/human/contractSubjectQuotation/${id}`)
}

// 获取报价单类型
export function getContractSubjectType(data) {
  return req.post('/api/authority/dictionary/query', data)
}

// 新增报价单
export function addContractSubjectQuotation(data) {
  return req.post('/api/human/contractSubjectQuotation', data)
}

// 编辑报价单
export function editContractSubjectQuotation(data) {
  return req.put('/api/human/contractSubjectQuotation', data)
}

// 通过订单号获取签约主体
export function getInfo(data) {
  return req.post('/api/human/contractSubject/returnUrl', data)
}

// 获取报价单商保明细列表
export function getContractSubjectQuotationInfoBusinessList(data) {
  return req.get(
    '/api/human/contractSubjectQuotation/businessListByQuotationId',
    data
  )
}

// 删除报价单商保明细
export function deleteContractSubjectQuotationInfoBusiness(params) {
  return req.delete('/api/human/contractSubjectQuotation/businessDelById', {
    params
  })
}

// 获取签约主体电子签
export function getContractSubjectElectronicVisaPage(data) {
  return req.post('/api/human/contractSubject/electronicVisaPage', data)
}

// 获取客户列表分页查询
export function getCustomerBaseList(data) {
  return req.post('/api/human/customerBase/page', data)
}

// 获取客户列表单个信息
export function getCustomerBaseInfo(id) {
  return req.get(`/api/human/customerBase/${id}`)
}

// 修改客户信息
export function editCustomerBaseInfo(data) {
  return req.put('/api/human/customerBase', data)
}

// 获取客户列表回收站分页查询
export function getCustomerBaseListDump(data) {
  return req.post('/api/human/customerBase/recyclingPage', data)
}

// 恢复客户列表回收站信息
export function restoreCustomerBaseListDump(params) {
  return req.put('/api/human/customerBase/restore', params)
}

// 新增客户
export function addCustomerBase(data) {
  return req.post('/api/human/customerBase', data)
}

// 新增客户账户密码
export function customerAccountPasswordSave(data) {
  return req.post('/api/human/customerBase/customerAccountPasswordSave', data)
}

// 删除客户
export function deleteCustomerBase(data) {
  return req.delete('/api/human/customerBase', { data })
}

// 修改客户联系方式
export function editCustomerContactListUpdate(data) {
  return req.put('/api/human/customerBase/customerContactListUpdate', data)
}

// 修改客户开票信息
export function editCustomerAccountListUpdate(data) {
  return req.put('/api/human/customerBase/customerAccountListUpdate', data)
}

// 修改客户地址管理
export function editCustomerAddressListUpdate(data) {
  return req.put('/api/human/customerBase/customerAddressListUpdate', data)
}

// 获取客户地址管理列表
export function getCustomerContactList(data) {
  return req.get(
    '/api/human/customerBase/customerAddressByCustomerbaseId',
    data
  )
}

// 删除客户地址管理
export function deleteCustomerContactList(params) {
  return req.delete('/api/human/customerBase/customerAddressDelById', {
    params
  })
}

// 删除客户联系方式
export function deleteCustomerContactDelById(params) {
  return req.delete('/api/human/customerBase/customerContactDelById', {
    params
  })
}
// 删除客户开票信息
export function deleteCustomerAccountDelById(params) {
  return req.delete('/api/human/customerBase/customerAccountDelById', {
    params
  })
}

// 删除客户付款账户信息
export function deletePaymentAccountDelById(params) {
  return req.delete('/api/human/customerBase/paymentAccountDelById', {
    params
  })
}

// 修改客户付款信息
export function editCustomerPaymentAccountListUpdate(data) {
  return req.put(
    '/api/human/customerBase/customerPaymentAccountListUpdate',
    data
  )
}

// 获取客户联系方式
export function getCustomerContactByCustomerbaseId(data) {
  return req.get(
    '/api/human/customerBase/customerContactByCustomerbaseId',
    data
  )
}

// 获取客户开票信息
export function getCustomerAccountByCustomerbaseId(data) {
  return req.get(
    '/api/human/customerBase/customerAccountByCustomerbaseId',
    data
  )
}

// 获取客户开票信息
export function getCustomerPaymentAccountByCustomerbaseId(data) {
  return req.get(
    '/api/human/customerBase/customerPaymentAccountByCustomerbaseId',
    data
  )
}

// 验证客户账户
export function checkAccount(data) {
  return req.get('/api/human/customerBase/checkAccount', data)
}

// 导入客户列表Excel
export function importCustomerBase(data) {
  return req.post('/api/human/customerBase/import', data)
}

// 导出客户列表Excel
export function exportCustomerBase(data) {
  return req.post('/api/human/customerBase/export', data, 'blob')
}

// 用户列表模块分页查询
export function getUserInfoList(data) {
  return req.post('/api/human/userInfo/page', data)
}

// 用户列表模块单体查询
export function getUserInfo(id) {
  return req.get(`/api/human/userInfo/${id}`)
}

// 用户列表模块删除
export function deleteUserInfo(data) {
  return req.delete('/api/human/userInfo', { data })
}

// 用户列表模块导出
export function exportUserInfoList(data) {
  return req.post('/api/human/userInfo/export', data, 'blob')
}

// 自动签署权限开通
export function openAutoSing(data) {
  return req.put('/api/human/contractSubject/openAutoSing', data)
}

// 自动签署权限开通后通过transaction_id获取客户信息
export function customerAutoSingReturnUrl(data) {
  return req.post('/api/human/contractSubject/contractSubjectReturnUrl', data)
}
